package org.penguin.study.bk.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * @author chengyinghua
 */

@Getter
public enum Gender {

    male(0, "男"), female(1,"女");

    @EnumValue
    private final Integer val;

    @JsonValue
    private final String desc;

    @JsonCreator
    Gender(Integer val, String desc) {
        this.val = val;
        this.desc = desc;
    }
}
